import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import refresh from '@dfeidao/atom-web/url/refresh';
import success from '@dfeidao/atom-web/msgbox/success';
import error from '@dfeidao/atom-web/msgbox/error';
import hide from '@dfeidao/atom-web/ui/hide';


export default async function a002(fd: IFeidaoAiBrowserComponent) {
	// 这里是确定删除
	const staff_no=get(fd,'staff_no');
	const res = await nodejs<{code: 0|1;result: string;}>('staff-management/zj-000001/s005',{filter:{staff_no}});
	if (res.code === 1) {
		success("成功");
		refresh();
		hide(fd.data.node);
	}
	if (res.code === 0) {
		error("删除失败");
	}
}
